dcc0d15e1972098e7d307cba05c6a1f8f51de0de,platform/lang-impl/src/com/intellij/ide/actions/CreateFileAction.java,MyValidator,checkInput,#String#,143
Before Change
final VirtualFile vFile = getDirectory().getVirtualFile();
final VirtualFile child = vFile.findChild(token);
if (child != null) {
myErrorText = "A " + (child.isDirectory() ? "directory" : "file") +
" with name '" + token + "' already exists";
return false;
}
After Change
else if (!".".equals(token)){
final VirtualFile child = vFile.findChild(token);
if (child != null) {
if (!child.isDirectory()) {
myErrorText = "A file with name '" + token + "' already exists";
return false;
}
else if (!tokenizer.hasMoreTokens()) {
myErrorText = "A directory with name '" + token + "' already exists";
return false;
}
}
vFile = child;